The present invention generally relates to a vehicle networking system, and more specifically, to a method of querying spatial events in a vehicle network and an optimized querier, an index creating method and an index creator, a database system with the index creator, and a vehicle network server with the optimized querier.
A vehicle network refers to a system which implements comprehensive sensing of roads and traffic through employing advanced sensor technology, network technology, computing technology, etc., to realize data interaction, and thus road traffic control and management. In order to achieve efficient road management, it is required to provide efficient database management and maintenance for spatial events in the vehicle network, so as to allow users to query spatial events in the vehicle network in real time rapidly.
In existing vehicle network systems, spatial events are mainly managed using grid index and R-tree index. FIG. 1 shows a schematic diagram of a method in the prior art of indexing and querying spatial events through grid index. In FIG. 1, a map containing road information and spatial events (e.g., a traffic accident occurred at a place, or a call for a taxi by a passenger at a place) is shown on the left, and an enlarged view of a dashed circle in the left view is shown on the right. Circles in the right view represent spatial events. Those spatial events are divided into grids. An index structure is created, so that when a user want to query spatial events, a certain-sized grid is first retrieved according to the query condition, then all spatial events in the grid are filtered according to the query condition. For example, all spatial events meeting a condition in a certain-sized grid are found at first, for example, 4 spatial events in a dashed block of the right view. Then, those spatial events are further filtered according to a query condition to obtain spatial events meeting the query condition.
In order to further query the accurate position of a spatial event, a located grid can be hierarchically subdivided in the space to locate a sub-grid where the spatial event locates. Those spatial-divided grids and sub-grids form an index, by which users can locate accurate positions of spatial events.
However, in such a method, when an index structure of spatial events is created, only spatial distances between positions of user vehicles and positions where those spatial events locate, but no actual reachable information of user vehicles with respect to the positions where the spatial events locate, are considered. For example, some events in the 4 spatial events above may not be reached directly by a user's vehicle without making a turn, which leads to an actual distance from the user's vehicle to a spatial event far longer than a distance specified by a query condition. In this case, further filtering may consume more computing resources of the system, and even no useful query results may be obtained. When the number of user vehicles is larger and the number of spatial events becomes larger, such index structure may exhibit a trend of exponential growth with the increase of vehicles and spatial events, lowering computing speed of the system, as a result, leading to slower responses to index queries, and thus, unable to satisfy real-time query requirement of users.